# x=[2 ,2.1 ,2.2 ,2.3 ]
# y=[[1.414214 ,1.449138 ,1.483240 ,1.516575]]

# x_str=input()
# y_str=input()


#x=[float(item) for item in x_str.strip().split(' ')]
x=[0.40 ,	0.55 ,	0.65 ,	0.80 ,	0.90]

n=len(x) #n=4
y = [[0 for j in range(n)] for i in range(n)]
#y[0]=[float(item) for item in y_str.strip().split(' ')]
y[0]=[0.41075 ,	0.57815 ,	0.69675 ,	0.88811 ,	1.02652]

for i in range(1,n): #1~3
    for j in range(i,n): #i~3
        y[i][j]=(y[i-1][j-1]-y[i-1][j])/(x[j-i]-x[j])



var=float(input())

# for i in range(1,n-1):
#     print("%.6f" %y[i][i] ,end=" ")
# print("%.6f" % y[n-1][n-1], end="")

show_arr=[]

sum=y[0][0]
for i in range(1,n): #1~n-1
    t=y[i][i]
    show_arr.append(t)
    for j in range(i):
        t*=var-x[j]
    sum+=t

#print(show_arr)
print("%.3f"%sum)

